__author__ = 'carlxie'

from multiprocessing import Process,Queue,Pool
from random import *
import time

def worker(x):
    for i in range(1,1000,1):
        a = 1
    return (x)

if __name__ == "__main__":
    pool = Pool(5)
    result = pool.map(worker,[(x,x) for x in range(20)])
    print result
    print "main"